<template>
	<input class="input" :type="type" :placeholder="placeholder" :value="value" @change="handler"/>
</template>

<script type="text/ecmascript-6">
    export default {
        //props:["type","placeholder","value","handler"]
	    props:{//配置自定义属性
			type:{type: String,default:"text"},//属性类型string，默认值text
		    placeholder:{type:String,required:true},//这个属性必须有required
		    value:String,
		    handler:Function//这个属性类型是个函数（简写）
	    }
    }
</script>

<style lang="stylus" rel="stylesheet/stylus" scoped>
	*
		outline none
	.input
		display block
		width 85%
		margin 0 auto
		padding .4rem 0
		border 0
		font-size .35rem
		border-bottom 0.02rem solid #ccc
</style>